//
//  RMAppDelegate.m
//  RMNote
//
//  Created by lxf on 16/4/14.
//  Copyright © 2016年 lxf. All rights reserved.
//

#import "RMAppDelegate.h"
#import "RMMainViewController.h"
#import "RMBrowseShortNoteViewController.h"
#import "RMWriteNoteViewController.h"
#import "RMLeadViewController.h"





#import "RMSystemSettingVC.h"

@implementation RMAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    self.nv = [[UINavigationController alloc]initWithRootViewController:[[RMMainViewController alloc]init]];
    [UINavigationBar appearance].tintColor = [UIColor whiteColor];
    [UINavigationBar appearance].barStyle = UIBarStyleBlackOpaque;
    [UINavigationBar appearance].translucent = NO;
    [UINavigationBar appearance].barTintColor = kRMBarTintColor;
    NSLog(@"%@",NSHomeDirectory());
    [UINavigationBar appearance].titleTextAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:kRealValue(17)]};
    //mark!!!:启动图
    if (![[NSUserDefaults standardUserDefaults]boolForKey:@"firstStart"]) {
        [[NSUserDefaults standardUserDefaults]setBool:YES forKey:@"firstStart"];
        
        NSLog(@"第一次启动");
        self.window.rootViewController = [[RMLeadViewController alloc]init];
  
        
    }else{
        NSLog(@"不是第一次启动");
//           self.window.rootViewController = [[RMLeadViewController alloc]init];
 
        self.window.rootViewController = self.nv;


        
    }
    
    
    

    //友盟分享
   
    
    
    

    
    return YES;
}

//- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
//{
//    BOOL result = [UMSocialSnsService handleOpenURL:url];
//    if (result == FALSE) {
//        //调用其他SDK，例如支付宝SDK等
//    }
//    return result;
//}

@end
